
<?php	$p=permissionController::singleton(); ?>
<div id="page">
<div id="content">
<?php 
			$uri['controller']="Seduta";
			$uri['method']="Update_AssegnaSeduta";
			if($p->permission($uri)){ ?>
<form action=<?php echo BASE_PATH;?>Seduta/Update_AssegnaSeduta/ method='get'>
Inserisci Studente 
<input type="submit" value="Assegna">
<input type="text" name="matricola" id="matricola" size="9"/>
<input type="hidden" name="seduta" value=<?php echo $_GET[id];?>>
 </form>
<?php } ?>
 	<table>

			<th>Matricola</th>
			<th>Nome</th>
			<th>Cognome</th>
			<th>Email</th>
			<?php 
			$uri['controller']="Seduta";
			$uri['method']="Delete_candidato";
			if($p->permission($uri)){ ?>
			<th>Cancella</th>
				<?php }?>
		<?php

		foreach ($vars as $result){
			echo "<tr>
					<td >"
					.$result[Matricola]."
					</td>
					<td >"
					.$result[Nome]."
					</td>
					<td >"
					.$result[Cognome]."
					</td>
						<td >"
					.$result[Email]."
					</td>";
					
		
			$uri['controller']="Seduta";
			$uri['method']="Delete_candidato";
			if($p->permission($uri)){ 
					echo"<td>
						<a  href='Seduta/Delete_Candidato/?id=".$result[Matricola]."'>
							<img src='".BASE_PATH."application/view/image/esci.png' border='0'>
						</a></td>";
				}
				echo "</tr>";
		}

	?>
</table>
<br>

</div>
</div>